<!DOCTYPE HTML>
<html>
<head>
<meta name="Generator" content="QQ 80342014" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="<?php echo $this->_var['keywords']; ?>" />
<meta name="Description" content="<?php echo $this->_var['description']; ?>" />

<title><?php echo $this->_var['page_title']; ?></title>

<link rel="shortcut icon" href="favicon.ico" />
<link rel="icon" href="animated_favicon.gif" type="image/gif" />
<link href="<?php echo $this->_var['ecs_css_path']; ?>" rel="stylesheet" type="text/css" />

<?php echo $this->smarty_insert_scripts(array('files'=>'transport_jquery.js,common.js,user.js')); ?>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />

</head>
<body style="background-color: rgb(244, 243, 239);">
<?php echo $this->fetch('library/user_header.lbi'); ?>
<link href="themes/view/css/user.css" rel="stylesheet" type="text/css" />
<div class="y-content">
 
<?php if ($this->_var['action'] == 'options'): ?>
<article class="pagecontent" style="display: block;" ui-view="" data-current-cache="false">
  <section class="" avalonctrl="options">
    <div class="options">
      <div class="nav-list position-relative">
        <a class="listitem" style="margin-left: 96px;" href="user.php?act=profile">
          <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">昵称：<?php if ($this->_var['profile']['nickname']): ?><?php echo $this->_var['profile']['nickname']; ?><?php else: ?><?php echo $this->_var['info']['mobile_phone_mi']; ?><?php endif; ?>
            <i class="farm-icon icon-arrow list-icon" style="margin-top: 17px;"></i></div>
        </a>
        <a class="listitem" style="margin-left: 96px;" href="user.php?act=smrz">
          <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">姓名：<?php echo $this->_var['info']['smname']; ?>
            <i class="farm-icon icon-arrow list-icon" style="margin-top: 17px;"></i></div>
        </a>
        <a class="listitem" style="margin-left: 96px;" href="user.php?act=smrz">
          <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">身份证：<?php echo $this->_var['info']['smsfz']; ?>
            <i class="farm-icon icon-arrow list-icon" style="margin-top: 17px;"></i></div>
        </a>
        <div class="options-header-img" style="text-align: center;width:auto;">
          <div class="options-circle" style="margin:10px;margin-top: 18px;"> 
              <a href="javascript:;">
                <img id="J_Avatar"  style="width: 90px;height: 90px;background-color: #FCFCFA;border:none;" src="<?php if ($this->_var['info']['touxiang']): ?><?php echo $this->_var['info']['touxiang']; ?><?php else: ?>themes/view/images/timg.jpg<?php endif; ?>">
                <input type="file" onchange="" name="avatar" class="input-file" style="height: 150px;"></a>
          </div>
        </div>
      </div>
      <div class="nav-list">
        <a class="listitem" href="user.php?act=smrz">
          <div>
            <i class="farm-icon icon-more-2"></i>实名认证：
			<?php if ($this->_var['info']['smname']): ?>
				已通过认证
			<?php else: ?>
				未认证
			<?php endif; ?> 
            <i class="farm-icon icon-arrow list-icon" style="margin-top: 17px;"></i></div>
        </a>
        <a class="listitem" href="user.php?act=forgetpass">
          <div>
            <i class="farm-icon icon-options-2"></i>支付密码：<?php if ($this->_var['info']['pay_password']): ?>已设置<?php else: ?>未设置<?php endif; ?>
            <i class="farm-icon icon-arrow list-icon" style="margin-top: 17px;"></i></div>
        </a>
        <a class="listitem" href="user.php?act=loginpass">
          <div>
            <i class="farm-icon icon-options-1"></i>登录密码：已设置
            <i class="farm-icon icon-arrow list-icon" style="margin-top: 17px;"></i></div>
        </a>
        <a class="listitem" href="user.php?act=profile">
          <div style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
            <i class="farm-icon icon-options-3"></i>收件地址：<?php echo $this->_var['info']['province_name']; ?><?php echo $this->_var['info']['city_name']; ?>
            <i class="farm-icon icon-arrow list-icon" style="margin-top: 17px;"></i></div>
        </a>
        <a class="listitem" href="user.php?act=msgoptions">
          <div>
            <i class="farm-icon icon-more-3" style="background-position: -40px 0;"></i>接收通知设定
            <i class="farm-icon icon-arrow list-icon" style="margin-top: 17px;"></i></div>
        </a> 
        <div class="listitem">
          <div>
            <i class="farm-icon icon-options-4"></i>手机号码：<?php echo $this->_var['info']['mobile_phone_mi']; ?>
            <span class="i-left" style="margin-top: 15px;margin-right: 12px;"><?php if ($this->_var['info']['mobile_phone_type'] == 1): ?>已验证<?php else: ?>未验证<?php endif; ?></span></div>
        </div>
      </div>
      <div class="nav-list" style="text-align: center;padding-left: 0;">
        <a class="listitem" href="user.php?act=logout">退出登录</a></div>
      </div>
  </section>
</article>


<?php endif; ?>




 
<?php if ($this->_var['action'] == 'msgoptions'): ?>

<article class="pagecontent" style="display: block;" ui-view="" data-current-cache="false"><section class="" avalonctrl="msg-options">
<div class="lxset-loading" id="J_SetMask" style="display: none;"></div>
<div class="msg-options">
	<div class="nav-list">
		<p>
            <a class="listitem" href="javascript:;"><i style="width: 24px;background-position: 0 -27px;margin-bottom:0;" class="farm-icon icon-mine-1"></i>推广购买通知</a>
			<span msg="tg_gm_msg" class="switch <?php if ($this->_var['user']['tg_gm_msg'] == 1): ?>switch-no <?php else: ?>switch-off<?php endif; ?>"></span>
		</p>
        <p>
            <a class="listitem" href="javascript:;"><i style="margin-bottom: -6px;" class=" farm-icon icon-msgoptions-1"></i>推广注册通知</a>
            <span  msg="tg_zc_msg" class="switch <?php if ($this->_var['user']['tg_zc_msg'] == 1): ?>switch-no <?php else: ?>switch-off<?php endif; ?>"></span>
        </p>
        <p>
            <a class="listitem" href="javascript:;"><i class="farm-icon icon-msgoptions-2"></i>羊只状态通知</a>
            <span msg="yz_zt_msg" class="switch <?php if ($this->_var['user']['yz_zt_msg'] == 1): ?>switch-no <?php else: ?>switch-off<?php endif; ?>" ></span>
        </p>
	</div>

	<div class="nav-list">
		<p>
            <a class="listitem" href="javascript:;"><i class="farm-icon icon-msgoptions-3"></i>羊只亲属状态通知</a>
			<span  msg="yz_qs_msg" class="switch <?php if ($this->_var['user']['yz_qs_msg'] == 1): ?>switch-no <?php else: ?>switch-off<?php endif; ?>" ></span>
		</p>
	</div>

	<div class="nav-list">
		<p>
		    <a class="listitem" href="javascript:;"><i class="farm-icon icon-msgoptions-4"></i>新羊上线通知</a>
            <span  msg="yz_xy_msg" class="switch <?php if ($this->_var['user']['yz_xy_msg'] == 1): ?>switch-no <?php else: ?>switch-off<?php endif; ?>"></span>
		</p>
	</div>

	<div class="nav-list">
		<p>
            <a class="listitem" href="javascript:;"><i class="farm-icon icon-msgoptions-5"></i>收益发放通知</a>
            <span  msg="yz_sy_msg" class="switch <?php if ($this->_var['user']['yz_sy_msg'] == 1): ?>switch-no <?php else: ?>switch-off<?php endif; ?>"></span>
		</p>
		<p>
		    <a class="listitem" href="javascript:;"><i class="farm-icon icon-more-1" style="background-position: 0 2px;height: 30px;width: 25px;margin-bottom: -6px;"></i>购买订单通知</a>
            <span  msg="yz_gm_msg" class="switch <?php if ($this->_var['user']['yz_gm_msg'] == 1): ?>switch-no <?php else: ?>switch-off<?php endif; ?>"></span>
		</p>
		<p>
			<a class="listitem" href="javascript:;"><i class="farm-icon icon-mine-6" style="width: 25px;height: 27px;background-position: -100px -24px;"></i>发货通知</a>
			<span  msg="yz_fh_msg" class="switch <?php if ($this->_var['user']['yz_fh_msg'] == 1): ?>switch-no <?php else: ?>switch-off<?php endif; ?>" ></span>
		</p>
		<p>
			<a class="listitem" href="javascript:;"><i class="farm-icon icon-msgoptions-6"></i>羊圈分享</a>
			<span class="switch switch-no"></span>
		</p>
	</div>
</div>
</section></article>
<script>
$(document).ready(function(){
	$('.nav-list span').click(function(){
		if($(this).hasClass('switch-no')){
			$(this).addClass('switch-off');
			$(this).removeClass('switch-no');
			var id  = 0;
		}else{
			$(this).addClass('switch-no');
			$(this).removeClass('switch-off');
			var id  = 1;
		}
		var type = $(this).attr('msg');
		Ajax.call('user.php?act=ajax_msg&type='+type+'&id='+id, '' , ajax_msg, 'GET', 'JSON');
	});
	function ajax_msg(res){
		if(res.error > 0){
			alert(res.msg);
			return ;
		}
	}
});
</script>

<?php endif; ?>




 
<?php if ($this->_var['action'] == 'profile'): ?>

<article class="pagecontent" style="display: block;" ui-view="" data-current-cache="false">
<section class="home-box s-controller" avalonctrl="myinfo">
<?php echo $this->smarty_insert_scripts(array('files'=>'jquery.json.js')); ?>
<?php echo $this->smarty_insert_scripts(array('files'=>'utils.js,transport_jquery.js,region.js')); ?>
        <script type="text/javascript">
		region.isAdmin = false;
          <?php $_from = $this->_var['lang']['profile_js']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['item']):
?>
            var <?php echo $this->_var['key']; ?> = "<?php echo $this->_var['item']; ?>";
          <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        </script>
<form name="formEdit" action="user.php" method="post" onSubmit="return userEdit()">
    <div class="myaddress">
        <div class="address-info" style="margin-bottom: 20px;">
            <div class="address-info-line">
                <p><span>昵称：</span>
                    <input type="text" name="nickname" placeholder="请输入昵称" value="<?php if ($this->_var['profile']['nickname']): ?><?php echo $this->_var['profile']['nickname']; ?><?php else: ?><?php echo $this->_var['info']['mobile_phone_mi']; ?><?php endif; ?>" class="address-input">
					<i class="fa fa-angle-down fa-lg light-grey"></i>
                </p>
            </div>
            <div class="address-info-line">
                <p><span>性别：</span>
                    <em style="margin-left: 70px;">
						<label><input name="sex" style="width: 18px;height: 18px;"<?php if ($this->_var['profile']['sex'] == 0): ?>checked="checked"<?php endif; ?> type="radio" value="1"> <?php echo $this->_var['lang']['secrecy']; ?>&nbsp;&nbsp;</label>
						<label><input name="sex" style="width: 18px;height: 18px;"<?php if ($this->_var['profile']['sex'] == 1): ?>checked="checked"<?php endif; ?> type="radio" value="1"> 男&nbsp;&nbsp;</label>
						<label><input name="sex" style="width: 18px;height: 18px;"<?php if ($this->_var['profile']['sex'] == 2): ?>checked="checked"<?php endif; ?> type="radio" value="2"> 女</label>
					</em>
                </p>
            </div> 
            <div class="address-info-line">
                <p><span>省份：</span>
                    <select name="province" style="margin-left: 67px;" class="lx-select" onchange="region.changed(this, 2, 'selCities')">
                        <option value="">请选择</option> 
                      <?php $_from = $this->_var['shop_province_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'province');if (count($_from)):
    foreach ($_from AS $this->_var['province']):
?>
                      <option value="<?php echo $this->_var['province']['region_id']; ?>" <?php if ($this->_var['profile']['province'] == $this->_var['province']['region_id']): ?>selected<?php endif; ?>><?php echo $this->_var['province']['region_name']; ?></option>
                      <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
             
                    </select>
                </p>
            </div>
            <div class="address-info-line">
                <p><span>城市：</span>
                    <select name="city" style="margin-left: 67px;" id="selCities" class="lx-select">
					<option value="">选择城市</option>
					 <?php $_from = $this->_var['city_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'city');if (count($_from)):
    foreach ($_from AS $this->_var['city']):
?>
                      <option value="<?php echo $this->_var['city']['region_id']; ?>" <?php if ($this->_var['profile']['city'] == $this->_var['city']['region_id']): ?>selected<?php endif; ?>><?php echo $this->_var['city']['region_name']; ?></option>
                      <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
					</select>
                </p>
            </div>
            <div class="address-info-line" >
                <textarea name="address" placeholder="请输入您的详细地址" class="etailed-street" style="resize:none;" cols="20"><?php echo $this->_var['profile']['address']; ?></textarea>
            </div>
        </div>
		<input name="act" type="hidden" value="act_edit_profile" />
        <div class="center"><button type="submit" class="green-btn">修改信息</button></div>
    </div>
 </form>
</section>
</article>

<?php endif; ?>




<?php if ($this->_var['action'] == 'smrz'): ?>

<article class="pagecontent" style="display: block;" ui-view="" data-current-cache="false">
<section class="home-box s-controller" avalonctrl="smrz">
<form action="user.php" method="post" id="smrz" name="theForm" >
    <div class="myaddress">
        <div class="address-info" style="margin-bottom: 20px;">
            <div class="address-info-line">
                <p><span>姓名：</span>
                    
                    <input type="text" id="smname" name="smname" value="<?php echo $this->_var['info']['smname']; ?>" placeholder="姓名需与提现银行卡户名一致" class="address-input">
                    <i class="fa fa-angle-down fa-lg light-grey"></i>
                </p>
            </div>
            <div class="address-info-line">
                <p><span>身份证号：</span>
                    
                    <input type="text" id="smsfz" name="smsfz"  value="<?php echo $this->_var['info']['smsfz']; ?>"  placeholder="请输入身份证号" class="address-input">
                    <i class="fa fa-angle-down fa-lg light-grey"></i>
                </p>
            </div>
			 <style>
			.file {
				position: relative;
				display: inline-block;
				background: none;
				border:none;
					left: 4rem;
			}
			.file input {
				position: absolute;
				width:100%;
				height:100%;
				right: 0;
				top: 0;
				opacity: 0;
			}
			</style>
			
			<div class="address-info-line">
                <p><span>手持身份证：</span>
					<?php if ($this->_var['info']['smsfzima']): ?>
						<a href="javascript:;" class="file" >
							<font  id="previw"><img src="<?php echo $this->_var['info']['smsfzima']; ?>" width="50px;"></font>
							 
						</a>
					<?php else: ?>
						<a href="javascript:;" class="file" >
							<font  id="previw"><img src="themes/view/images/add.png" width="50px;"></font>
							<input type="file" name="img"   onchange="previw(this,'desc','previw')">
							<input type="hidden" id="desc" name="desc">
						</a>
					<?php endif; ?> 
                    <i class="fa fa-angle-down fa-lg light-grey"></i>
                </p>
            </div>
			<div class="address-info-line">
                <p><span>身份证正面：</span>
					<?php if ($this->_var['info']['smsfzima1']): ?>
						<a href="javascript:;" class="file" >
							<font  id="previw1"><img src="<?php echo $this->_var['info']['smsfzima1']; ?>" width="50px;"></font>
							 
						</a>
					<?php else: ?>
						<a href="javascript:;" class="file" >
							<font  id="previw1"><img src="themes/view/images/add.png" width="50px;"></font>
							<input type="file" name="img1"   onchange="previw(this,'desc1','previw1')">
							<input type="hidden" id="desc1" name="desc1">
						</a>
					<?php endif; ?> 
                    <i class="fa fa-angle-down fa-lg light-grey"></i>
                </p>
            </div>
			<div class="address-info-line">
                <p><span>身份证反面：</span>
					<?php if ($this->_var['info']['smsfzima2']): ?>
						<a href="javascript:;" class="file" >
							<font  id="previw2"><img src="<?php echo $this->_var['info']['smsfzima2']; ?>" width="50px;"></font>
							 
						</a>
					<?php else: ?>
						<a href="javascript:;" class="file" >
							<font  id="previw2"><img src="themes/view/images/add.png" width="50px;"></font>
							<input type="file" name="img2"   onchange="previw(this,'desc2','previw2')">
							<input type="hidden" id="desc2" name="desc2">
						</a>
					<?php endif; ?> 
                    <i class="fa fa-angle-down fa-lg light-grey"></i>
                </p>
            </div>
			
            
        </div>
		
        <p style="padding: 0 20px 20px;line-height: 1rem;font-size: 0.7rem;color: #282828;">
		1、拍摄完整的身份证原件照     <br/>
		2、照片中的身份证文字清晰可见 <br/>
		3、建议放在白纸上拍摄         <br/>
		</p>
        
		<?php if ($this->_var['info']['state'] == 1 || $this->_var['info']['state'] == 4): ?>
		<input type="hidden" name="act" value="act_smrz" />
        <div class="center"><button type="button" onclick="smrz()" class="green-btn">提交实名认证</button></div>
		<br/>
		<?php endif; ?>
		<?php if ($this->_var['info']['state'] == 2): ?>
 
		  <div class="center" style="    font-size: 0.9rem;color: red;">实名认证正在审核中 ...</div>
		<p style="padding: 0 20px 20px;line-height: 1rem;font-size: 0.7rem;color: #282828;">备注：<?php echo $this->_var['info']['bz']; ?></p>
		<?php endif; ?>
		<?php if ($this->_var['info']['state'] == 3): ?>
		 <div class="center"><button type="button" class="green-btn">审核通过</button></div>
		<?php endif; ?>
		<?php if ($this->_var['info']['state'] == 4): ?>
		 <div class="center" style="    font-size: 0.9rem;color: red;">未通过审核</div>
		 <p class="center" style="padding: 0 20px 20px;line-height: 1rem;font-size: 0.7rem;color: #282828;">备注：<?php echo $this->_var['info']['bz']; ?></p>
		<?php endif; ?>
    </div>
</form>
    
    <div class="mask">
        <div style="width:78%;background-color:#fff;top:50%;left:50%;text-align:center;position:absolute; -webkit-transform: translate(-50%, -50%);-moz-transform: translate(-50%, -50%);-ms-transform: translate(-50%, -50%); -o-transform: translate(-50%, -50%); transform: translate(-50%, -50%);padding:20px 14px;border-radius:3px;">
            <div style="margin-bottom:24px;">
                <p>是否确认删除实名信息？</p>
            </div>
            <div style="font-size:0;width:100%;">
                <button value="yes" style="padding: 4px 42px;border-radius: 3px;font-size: 14px;margin: 0 10px;box-sizing: border-box;float: left;">是</button>
                <button style=" padding: 4px 42px;border-radius: 3px;font-size: 14px;margin: 0 10px;box-sizing: border-box;float: right;">否</button>
            </div>
        </div>
    </div>
</section>
</article>

<script>
function smrz(obj){
 
	var smname = $('#smname').val();
	var smsfz = $('#smsfz').val();
	if(!smname){
		msgs('请填写姓名');
		return false;
	}
	if(!smsfz){
		msgs('请填写身份证号');
		return false;
	}
	if(smsfz.length <= 15 || smsfz.length >= 22 ){
		msgs('输入正确的身份证号');
		return false;
	}
	$('#smrz').submit();
	


}

function previw(file,id,previw)  
{  	 
	
	var prevDiv = document.getElementById(previw);  
	if (file.files && file.files[0]){  
		 var reader = new FileReader();  
		  reader.onload = function(evt){  
		  console.log(evt);
		  prevDiv.innerHTML = '<img src="' + evt.target.result + '" width="50px" height="50px" />'; 
	 
			$("#"+id).val(evt.target.result);
		}    
		 reader.readAsDataURL(file.files[0]);  
	}else{  
			prevDiv.innerHTML = '<div class="img" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src=\'' + file.value + '\'"></div>';  
		 }  
} 

</script>




<?php endif; ?>







<?php if ($this->_var['action'] == 'loginpass' || $this->_var['action'] == 'czloginpass'): ?>
 <?php echo $this->smarty_insert_scripts(array('files'=>'utils.js')); ?>
<script type="text/javascript">
  <?php $_from = $this->_var['lang']['profile_js']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['item']):
?>
	var <?php echo $this->_var['key']; ?> = "<?php echo $this->_var['item']; ?>";
  <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</script>
<article class="pagecontent" style="display: block;" ui-view="" data-current-cache="false">
<section class="" avalonctrl="loginpasschange">
	<dl class="infl-nav">
		<dd class="<?php if ($this->_var['action'] == 'loginpass'): ?>cur<?php endif; ?> w50"><a href="user.php?act=loginpass">修改登录密码</a></dd>
		<dd class="<?php if ($this->_var['action'] == 'czloginpass'): ?>cur<?php endif; ?> w50"><a href="user.php?act=czloginpass">重置登录密码</a></dd>
	</dl>
<?php if ($this->_var['action'] == 'loginpass'): ?>
<div class="password-change">
   <form name="formPassword" id="formPassword" action="user.php" method="post"  onSubmit="return editPassword()" >
		<div class="change-info">
			<div class="change-info-line">原密码：<input  name="old_password" id="old_password"  type="password" class="change-input"></div>
			<div class="change-info-line">新密码：<input  name="new_password"  id="new_password"  type="password" class="change-input"></div>
			<div class="change-info-line">确认新密码：<input  name="comfirm_password" id="comfirm_password"  type="password" class="change-input"></div>
		</div>
		<input name="act" type="hidden" value="act_edit_password" />
 
		<div class="center"><button type="button" id="queren" class="green-btn">确认</button></div>
	</form>
</div>
<?php endif; ?>
<?php if ($this->_var['action'] == 'czloginpass'): ?>
<?php echo $this->smarty_insert_scripts(array('files'=>'transport_jquery.js')); ?>
<?php echo $this->smarty_insert_scripts(array('files'=>'jquery.json.js')); ?>
	<?php echo $this->smarty_insert_scripts(array('files'=>'sms.js')); ?>
   <form name="formPassword" id="getPassword2" action="user.php" method="post"  onSubmit="return submitPwd()" >
<div class="forgetpass">
    <div class="change-info">
        <div class="change-info-line">手机号码：<input type="text" id="tel" name="tel" class="change-input" placeholder="请输入您的手机号码"></div>
        <div class="change-info-line">新密码：<input type="password" id="new_password" name="new_password" class="change-input"></div>
        <div class="change-info-line">确认新密码：<input type="password" id="confirm_password" name="confirm_password" class="change-input"></div>
        <div class="change-info-line">
            验证码：
            <input type="number" style="width:100px" name="codes" id="code" class="change-input" placeholder="手机收到的验证码">
            
			<input style="margin: 0;" class="y-sryzm y-hqyzm get-code-data-t get-code" type="button" id="zphone"  onclick="getverifycode4()" value="获取验证码" name=""/>
		 
        </div>
    </div>
	<input name="act" type="hidden" value="act_edit_password" />
	<input name="type" type="hidden" value="chongzhi" />
	<div class="center"><button type="button" id="chongzhi" class="green-btn">确认</button></div>
	 
</div>
</form>
<?php endif; ?>
</section>
</article>
<script>
$('#chongzhi').click(function(){
	var tel = $('#tel').val();
	var new_password = $('#new_password').val();
	var confirm_password = $('#confirm_password').val();
	var code = $('#code').val();
	if(!tel){
		msgs('请输入手机号');
		return false;
	}
	if(!new_password || new_password.length < 6 || !confirm_password || confirm_password.length < 6){
		msgs('请输入新密码,长度大于6位');
		return false;
	}
	if(!code){
		msgs('请输入验证码');
		return false;
	}
	$('#getPassword2').submit();
});



$('#queren').click(function(){
	var old_password = $('#old_password').val();
	var new_password = $('#new_password').val();
	var comfirm_password = $('#comfirm_password').val();
	if(!old_password || old_password.length < 6){
		msgs('请输入正确的原密码,长度大于6位');
		return false;
	}
	if(!new_password || new_password.length < 6 || !comfirm_password || comfirm_password.length < 6){
		msgs('请输入新密码,长度大于6位');
		return false;
	}
	if(new_password !=  comfirm_password){
		msgs('两次密码不一致');
		return false;
	}
	
	$('#formPassword').submit();
	
});
</script>

<?php endif; ?>






<?php if ($this->_var['action'] == 'forgetpass' || $this->_var['action'] == 'czforgetpass'): ?>
 <?php echo $this->smarty_insert_scripts(array('files'=>'utils.js')); ?>
<script type="text/javascript">
  <?php $_from = $this->_var['lang']['profile_js']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['item']):
?>
	var <?php echo $this->_var['key']; ?> = "<?php echo $this->_var['item']; ?>";
  <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
</script>
<article class="pagecontent" style="display: block;" ui-view="" data-current-cache="false">
<section class="" avalonctrl="loginpasschange">
	<dl class="infl-nav">
		<dd class="<?php if ($this->_var['action'] == 'forgetpass'): ?>cur<?php endif; ?> w50"><a href="user.php?act=forgetpass">修改支付密码</a></dd>
		<dd class="<?php if ($this->_var['action'] == 'czforgetpass'): ?>cur<?php endif; ?> w50"><a href="user.php?act=czforgetpass">重置支付密码</a></dd>
	</dl>
<?php if ($this->_var['action'] == 'forgetpass'): ?>
<div class="password-change">
   <form name="formPassword" id="formPassword" action="user.php" method="post" >
		<div class="change-info">
			<div class="change-info-line">原密码：<input  name="old_password" id="old_password"  type="password" class="change-input"></div>
			<div class="change-info-line">新密码：<input  name="new_password"  id="new_password"  type="password" class="change-input"></div>
			<div class="change-info-line">确认新密码：<input  name="comfirm_password" id="comfirm_password"  type="password" class="change-input"></div>
		</div>
		<input name="act" type="hidden" value="act_pay_password" />
 
		<div class="center"><button type="button" id="queren" class="green-btn">确认</button></div>
	</form>
</div>
<?php endif; ?>
<?php if ($this->_var['action'] == 'czforgetpass'): ?>
<?php echo $this->smarty_insert_scripts(array('files'=>'transport_jquery.js')); ?>
<?php echo $this->smarty_insert_scripts(array('files'=>'jquery.json.js')); ?>
	<?php echo $this->smarty_insert_scripts(array('files'=>'sms.js')); ?>
   <form name="formPassword" id="getPassword2" action="user.php" method="post"  onSubmit="return submitPwd()" >
<div class="forgetpass">
    <div class="change-info">
        <div class="change-info-line">手机号码：<input type="text" id="tel" name="tel" class="change-input" placeholder="请输入您的手机号码"></div>
        <div class="change-info-line">新密码：<input type="password" id="new_password" name="new_password" class="change-input"></div>
        <div class="change-info-line">确认新密码：<input type="password" id="confirm_password" name="confirm_password" class="change-input"></div>
        <div class="change-info-line">
            验证码：
           <input type="number" style="width:100px" name="codes" id="code" class="change-input" placeholder="手机收到的验证码">
            
			<input style="margin: 0;" class="y-sryzm y-hqyzm get-code-data-t get-code" type="button" id="zphone"  onclick="getverifycode5()" value="获取验证码" name=""/>
        </div>
    </div>
	<input name="act" type="hidden" value="act_pay_password" />
	<input name="type" type="hidden" value="chongzhi" />
	<div class="center"><button type="button" id="chongzhi" class="green-btn">确认</button></div>
	 
</div>
</form>
<?php endif; ?>
</section>
</article>
<script>
$('#chongzhi').click(function(){
	var tel = $('#tel').val();
	var new_password = $('#new_password').val();
	var confirm_password = $('#confirm_password').val();
	var code = $('#code').val();
	if(!tel){
		msgs('请输入手机号');
		return false;
	}
	if(!new_password || new_password.length < 6 || !confirm_password || confirm_password.length < 6){
		msgs('请输入新密码,长度大于6位');
		return false;
	}
	if(!code){
		msgs('请输入验证码');
		return false;
	}
	$('#getPassword2').submit();
});



$('#queren').click(function(){
	var old_password = $('#old_password').val();
	var new_password = $('#new_password').val();
	var comfirm_password = $('#comfirm_password').val();


	if(!new_password || new_password.length < 6 || !comfirm_password || comfirm_password.length < 6){
		msgs('请输入新密码,长度大于6位');
		return false;
	}
	if(new_password !=  comfirm_password){
		msgs('两次密码不一致');
		return false;
	}
	
	$('#formPassword').submit();
	
});
</script>

<?php endif; ?>





<?php if ($this->_var['action'] == 'mybankcard'): ?>
<article class="pagecontent" style="display: block;" ui-view="" data-current-cache="false">
	<section class="home-box" avalonctrl="mybankcard">
	<div class="mybankcard">
		<?php if ($this->_var['banklist']): ?>
			<?php $_from = $this->_var['banklist']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['item']):
?>
			<a class="a" href="user.php?act=bankcardinfo&id=<?php echo $this->_var['item']['bank_id']; ?>">
				<div class="bankcard-line mg-top">
					<div class="bankcard-name"><?php echo sub_str($this->_var['item']['bank_name'],12); ?>(尾号：<?php echo $this->_var['item']['weihao']; ?>)</div>
					<i class="fa fa-angle-right fa-2x light-grey farm-icon icon-arrow list-icon"></i>
				</div>
			</a>
			<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
		<?php else: ?>
			<a href="user.php?act=bankcardinfo" class="a">
				<div class="bankcard-line mg-top">
					<div class="add-bankcard">+添加银行卡</div>
					<i class="fa fa-angle-right fa-2x light-grey farm-icon icon-arrow list-icon"></i>
					<div class="clearboth"></div>
				</div>
			</a>
		<?php endif; ?>
		</div>
	</section>
</article>

<?php endif; ?>



<?php if ($this->_var['action'] == 'bankcardinfo'): ?>
<?php echo $this->smarty_insert_scripts(array('files'=>'jquery.json.js')); ?>
<?php echo $this->smarty_insert_scripts(array('files'=>'utils.js,transport_jquery.js,region.js')); ?>
        <script type="text/javascript">
		region.isAdmin = false;
          <?php $_from = $this->_var['lang']['profile_js']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('key', 'item');if (count($_from)):
    foreach ($_from AS $this->_var['key'] => $this->_var['item']):
?>
            var <?php echo $this->_var['key']; ?> = "<?php echo $this->_var['item']; ?>";
          <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        </script>
<article class="pagecontent" style="display: block;" ui-view="" data-current-cache="false">
<section class="" avalonctrl="bankcardinfo">
<form name="userBank" id="userBanks" action="user.php" method="post" >
	<div class="bankcardinfo">

		<div class="nav-list position-relative">
			<div class="listitem"><div class="lx-fsd">持卡人</div>
				<div class="iteminfo">
					<input type="text" class="lx-input" name="name" placeholder="请输入持卡人" value="<?php echo $this->_var['info']['smname']; ?>" readonly="">
				</div>
			</div>
			<div class="listitem"><div class="lx-fsd">银行卡号</div>
				<div class="iteminfo"><input class="lx-input" type="tel" onblur="ajax_bankcardinfo(this)"  onchange="ajax_bankcardinfo(this)" name="bank_num" value="<?php echo $this->_var['bank']['bank_num']; ?>" placeholder="请输入银行卡号"></div>
			</div>
			<div class="listitem"><div class="lx-fsd">卡类型</div>
				<div class="iteminfo"><input class="lx-input" type="text"   name="bank_name" value="<?php echo $this->_var['bank']['bank_name']; ?>" placeholder="卡类型"></div>
			</div>
			<div class="listitem"><div class="lx-fsd">预留手机</div>
				<div class="iteminfo"><input class="lx-input" id="tel"  name="bank_tel" type="tel"  value="<?php echo $this->_var['bank']['bank_tel']; ?>" maxlength="11" placeholder="请正确填写预留手机号"></div>
			</div>
			
			<?php if ($this->_var['bank_id'] > 0): ?>
			<div class="listitem"><div class="lx-fsd">删除卡</div>
				<div class="iteminfo"><input type="checkbox" name="del" style="width: 20px;height: 20px;"><span style="color:#999;">（删除卡请勾选）</span></div>
			</div>
		<?php endif; ?>
		</div>
		
		<div class="nav-list position-relative" <?php if ($this->_var['bank_id'] > 0): ?> style="display:none" <?php endif; ?>>
			<div class="listitem">
				<div class="lx-fsd">省份</div>
			
				 <select name="province"  class="lx-select" onchange="region.changed(this, 2, 'selCities')">
                        <option value="">请选择</option> 
                      <?php $_from = $this->_var['shop_province_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'province');if (count($_from)):
    foreach ($_from AS $this->_var['province']):
?>
                      <option value="<?php echo $this->_var['province']['region_id']; ?>" <?php if ($this->_var['bank']['province'] == $this->_var['province']['region_id']): ?>selected<?php endif; ?>><?php echo $this->_var['province']['region_name']; ?></option>
                      <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
             
                    </select>
				<i class="fa fa-angle-down fa-lg light-grey"></i>
			</div>
			<div class="listitem" >
				<div class="lx-fsd">城市</div>
				 <select name="city" id="selCities" class="lx-select">
					<option value="">选择城市</option>
					 <?php $_from = $this->_var['city_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'city');if (count($_from)):
    foreach ($_from AS $this->_var['city']):
?>
                      <option value="<?php echo $this->_var['city']['region_id']; ?>" <?php if ($this->_var['bank']['city'] == $this->_var['city']['region_id']): ?>selected<?php endif; ?>><?php echo $this->_var['city']['region_name']; ?></option>
                      <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
					</select>
				<i class="fa fa-angle-down fa-lg light-grey"></i>
			</div>
			<div class="listitem"><div class="lx-fsd">开户行</div>
				<div class="iteminfo"><input class="lx-input" name="bank_khh" type="text" placeholder="请正确填写降低转账失败率"></div>
			</div>
			
			<input type="hidden" name="bank_id"value="<?php echo $this->_var['bank_id']; ?>">
			<input type="hidden" name="froms" value="<?php echo $this->_var['froms']; ?>">
			<input type="hidden" name="act" value="bankinfo">
		</div>
		<p style="padding: 0 20px 0px;line-height: 1.7rem;font-size: 0.7rem;color: #282828;">1.本次绑定的银行卡仅适用于青山羊币提现；<br>
			2.通过认证支付方式购买羊只仍需重新绑定银行卡，绑定成功后将替代本卡用于提现。</p>
		<div class="center mt50" style="margin-top: 20px;">

			<button class="green-btn" id="userBank" type="button">确定</button>
		</div>
		
	</div>
</form> 
</section>
</article>
<?php endif; ?>














</div>
<?php echo $this->fetch('library/foot.lbi'); ?>

</div>
</body>
</html>